<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>考试</title>
    <link rel="stylesheet" href="/css/webPage/swiper.min.css">
    <link rel="stylesheet" href="/css/webPage/exam.css">
</head>
<body>
<%- include ("../publicEjs/public.ejs")%>
<div class="all">
    <div class="container">
        <div class="leftSide">
            <div class="information">
                <div class="name">考生：<span class="myName"></span></div>
                <div class="countdown"> 倒计时：
                    <h3 id="time"><%=list[1].time%></h3>
                    <input id="remainingTime" value="<%=list[1].time%>" style="display: none">
                </div>
            </div>
            <div class="answerCard">
                <div class="cardTitle">答题卡</div>
                <div class="allCard">
                    <ul class="swiper-pagination" ></ul>
                </div>
                <label class="submitBtn" onclick="submit()">
                    <input type="submit" class="submit"/>
                </label>
            </div>
        </div>
        <div class="examPage">
            <div class="title">
                <%=list[1].test_name%>
            </div>
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <!--题目-->

                    <%for(var i=0;i<list[0].length;i++){%>
                    <div class="swiper-slide swiperActive">
                        <!--题干-->


                        <div class="subject">
                            <img src="<%=list[0][i].picUrl%>" alt="题干" />
                        </div>
                        <!--选项-->
                        <div class="option" id="timu<%=i%>">
                            <% if (list[0][i].isMany==0) { %>
                            <ul>
                                <li>
                                    <label class="labelRadio">

                                        <input type="radio" name="radio<%=i%>" id="answerA" value="A"/>
                                        A :<span><%-list[0][i].answerA%></span>


                                    </label>
                                </li>
                                <li>
                                    <label class="labelRadio">
                                        <input type="radio"  name="radio<%=i%>" id="answerB" value="B"/>
                                        B :<span><%-list[0][i].answerB%></span>
                                    </label>
                                </li>
                                <li>
                                    <label class="labelRadio">
                                        <input type="radio"  name="radio<%=i%>" id="answerC" value="C"/>
                                        C :<span><%-list[0][i].answerC%></span>
                                    </label>
                                </li>
                                <li>
                                    <label class="labelRadio">
                                        <input type="radio"  name="radio<%=i%>" id="answerD" value="D"/>
                                        D :<span><%-list[0][i].answerD%></span>
                                    </label>
                                </li>
                            </ul>
                            <% } else { %>
                            <ul>
                                <li>
                                    <label class="labelRadio">
                                        <input type="checkbox" name="radio<%=i%>" id="answerA" value="A"/>
                                        A :<span><%-list[0][i].answerA%></span>
                                    </label>
                                </li>
                                <li>
                                    <label class="labelRadio">
                                        <input type="checkbox"  name="radio<%=i%>" id="answerB" value="B"/>
                                        B :<span><%-list[0][i].answerB%></span>
                                    </label>
                                </li>
                                <li>
                                    <label class="labelRadio">
                                        <input type="checkbox"  name="radio<%=i%>" id="answerC" value="C"/>
                                        C :<span><%-list[0][i].answerC%></span>
                                    </label>
                                </li>
                                <li>
                                    <label class="labelRadio">
                                        <input type="checkbox"  name="radio<%=i%>" id="answerD" value="D"/>
                                        D :<span><%-list[0][i].answerD%></span>
                                    </label>
                                </li>

                            </ul>

                            <% } %>

                            <input class="answerId" value='<%=list[0][i].id%>' style="display: none">
                            <input id="length" value='<%=list[0].length%>' style="display: none">
                        </div>
                    </div>
                    <%}%>
                </div>

                </div>
                <div class="btn">
                        <div class="swiper-button-prev">上一题</div>
                        <div class="swiper-button-next">下一题</div>
                </div>
            </div>
        <div style="clear: both"></div>
    </div>

</div>

<%- include ("../publicEjs/foot.ejs")%>

</body>
<script src="/js/jquery.js"></script>
<script src="/js/webPage/exam.js"></script>
<script src="/js/webPage/swiper.min.js"></script>
<script>
    $.ajax({
        type: 'POST',
        url: '/admin/exam/MYExam',
        success: function (data) {
            console.log("--------------------");
            console.log(data)
            $(".myName").html(data.data)
        }
    })
</script>

</html>
